﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace SuperManagement.LoadPage
{
    /// <summary>
    /// InventoryQuery.xaml 的交互逻辑
    /// </summary>
    public partial class InventoryQuery : Page
    {
        public InventoryQuery()
        {
            InitializeComponent();
        }

        private void TypeOfQueryChange(object sender, SelectionChangedEventArgs e)
        {
            string str1 = QueryType.SelectedValue.ToString();
            string str = str1.Replace("System.Windows.Controls.ComboBoxItem: ", "");
            if (str == "直接查询")
            {
                DirectCheck.Visibility = Visibility.Visible;
                IndirectCheck.Visibility = Visibility.Collapsed;
            }
            else if (str == "间接查询")
            {
                DirectCheck.Visibility = Visibility.Collapsed;
                IndirectCheck.Visibility = Visibility.Visible;
            }
        }

        private void TypeOfFunctionChange(object sender, SelectionChangedEventArgs e)
        {
            string str1 = FunctionType.SelectedValue.ToString();
            string str = str1.Replace("System.Windows.Controls.ComboBoxItem: ", "");
            if (str == "物品名称")
            {
                LFunctionType.Content = "请输入货物的名称：";
            }
            else if (str == "物品ID")
            {
                LFunctionType.Content = "请输入货物的ID：";
            }
        }

        private void TypeOfFunctionChange1(object sender, SelectionChangedEventArgs e)
        {
            string str1 = FunctionType1.SelectedValue.ToString();
            string str = str1.Replace("System.Windows.Controls.ComboBoxItem: ", "");
            if (str == "物品名称")
            {
                LFunctionType1.Content = "请输入货物的名称：";
            }
            else if (str == "物品ID")
            {
                LFunctionType1.Content = "请输入货物的ID：";
            }
        }
    }
}
